package com.woniu.finance.contorller;

import com.woniu.aop.OperationLogAnnotation;
import com.woniu.finance.entity.Bill;
import com.woniu.finance.entity.RequestParam;
import com.woniu.finance.service.IBillService;
import com.woniu.util.utils.HttpResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/finance/bill")
public class BillController {

    @Autowired(required = false)
    private IBillService billService;


    /** 
    * @Description: 根据企业id查询订单
    * @Param: [enterpriseId]
    * @return: com.woniu.util.utils.HttpResult<?>
    * @Author: 阿水
    * @Date: 2023/5/8
    */
    @RequestMapping("findBillByEnterpriseId")
    @OperationLogAnnotation(operModul = "融资企业-根据企业id查询订单",operType = "查询",operDesc = "根据企业id查询订单")//操作日志注解
    public HttpResult<?> findFinanceById(@RequestBody RequestParam<Bill> param) {
        return billService.findBillByEnterpriseId(param);
    }

    /** 
    * @Description: 根据id删除bill信息
    * @Param: [id]
    * @return: com.woniu.util.utils.HttpResult<?>
    * @Author: 阿水
    * @Date: 2023/5/8
    */

    @RequestMapping("removeBillById")
    @OperationLogAnnotation(operModul = "融资企业-根据id删除bill信息",operType = "删除",operDesc = "根据id删除bill信息")//操作日志注解
    public HttpResult<?> removeBillById(Integer id) {
        return billService.removeBillById(id);
    }


}
